package com.njym.java.security.app.biz;

import com.njym.java.security.common.biz.BaseBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.njym.java.security.app.entity.FamilyType;
import com.njym.java.security.app.mapper.FamilyTypeMapper;

import javax.annotation.Resource;

/**
 * 
 *
 * @author lijie
 * @email 717057076@qq.com
 * @date 2019-12-18 15:37:52
 */
@Service
public class FamilyTypeBiz extends BaseBiz<FamilyTypeMapper,FamilyType> {

    @Resource
   private FamilyTypeMapper familyTypeMapper;

    public void add(Integer userId, String familyName,String url){
        FamilyType familyType = new FamilyType();
        familyType.setUserId(userId);
        familyType.setFamilyName(familyName);
        familyType.setUrl(url);
        familyType.setDeleted(0);
        mapper.insertSelective(familyType);
    }


    public int insertFamily(FamilyType familyType) {
     return    familyTypeMapper.insertFamily(familyType);
    }
}